import request from '@/utils/request'

export default {
  login(data) {
    return request({
      url: '/auth/login',
      method: 'POST',
      data
    })
  },
  
  register(data) {
    return request({
      url: '/auth/register',
      method: 'POST',
      data
    })
  },
  
  getProfile() {
    return request({
      url: '/users/profile',
      method: 'GET'
    })
  },
  
  updateProfile(data) {
    return request({
      url: '/users/profile',
      method: 'PUT',
      data
    })
  },
  
  bindPartner(data) {
    return request({
      url: '/users/bind-partner',
      method: 'POST',
      data
    })
  },
  
  getPartnerInfo() {
    return request({
      url: '/users/partner',
      method: 'GET'
    })
  }
}